package org.krishna.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

@Entity
@Table(name = "course_enroll")
public class Enrol implements Serializable{
	
	/** The Constant serialVersionUID. */
	@Transient
	private static final long serialVersionUID = -7660824605183781430L;
	
	@Id
	@GeneratedValue
	@Column(name = "enrol_id")
	private int enrolId;
	
	@ManyToOne
	@JoinColumn(name = "enrol_course_id")
	private Course course;
	
	@ManyToOne
	@JoinColumn(name = "student_id")
	private Login student;

	public int getEnrolId() {
		return enrolId;
	}

	public void setEnrolId(int enrolId) {
		this.enrolId = enrolId;
	}

	public Course getCourse() {
		return course;
	}

	public void setCourse(Course course) {
		this.course = course;
	}

	public Login getStudent() {
		return student;
	}

	public void setStudent(Login student) {
		this.student = student;
	}
	
	
}
